package com.查找算法;

class Solution6 {
    //二分法
    public int minArray(int[] numbers) {
        int i=0,j=numbers.length-1;
        while (i<=j){
            int mid=i+(j-i)/2;
            if(numbers[mid]>numbers[j]) i=mid+1;
            else if(numbers[mid]<numbers[j]) j=mid-1;
            else j=j-1;
        }
        return numbers[i];
    }
}

public class 剑指Offer11旋转数组的最小数字 {
    public static void main(String[] args) {

    }
}
